package com.icloud.system.boot.controller.admin;

import com.icloud.common.core.api.CommonResult;
import com.icloud.common.web.vo.PageVO;
import com.icloud.system.boot.dto.AdminCustomerPageDto;
import com.icloud.system.boot.service.AdminCustomerService;
import com.icloud.system.boot.vo.AdminCustomerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "客户账户后台服务")
@RequestMapping("/admin/customer")
@RequiredArgsConstructor
public class AdminCustomerController {
    private final AdminCustomerService adminCustomerService;
    @ApiOperation("分页")
    @GetMapping("/page")
    //@Permission("system.adminUser.page")
    public CommonResult<PageVO<AdminCustomerVo>> page(@Validated @RequestBody AdminCustomerPageDto dto){
        return CommonResult.success(adminCustomerService.customerPage(dto));
    }
}
